(function () {

	var iAuctionId = page.url.get('id');
	var $modal = $('#pop-modal');
	
	if(jQuery.isEmptyObject(iAuctionId))
	{
		$('.am-modal-bd').text('参数错误');
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);

		return;
	}

	getPageData({
		auctionId:iAuctionId
	});
	 
	function getPageData (Filter)
	 {
	 	var Filter = Filter;
	 		Filter.page = page.page;
	 		Filter.pageSize = page.pageSize;
	 	getJson(Domain+'/mbr/usedAuction/doUsedAuctionDetail.do', Filter, function (res) {
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);
				return;
		  }
		  else{
		  	
      		  if(!res.success){
		       $('.am-modal-bd').text('系统错误');
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);
		        return
		      }

			renderTmp('#detail', 'detailtpl',res);
			 lazyLoad.refresh(true);

		$('#small-image').magnify({
          shape: 'rect',
          width: 120
        });


    $('.item-box').mouseenter(function(){
        $('.item-box').removeClass('active');
        $(this).addClass('active');
        $('#small-image').attr('src',$(this).find('img').attr('src'));
        $('.am-margin-left-sm').find('img').attr('src',$(this).find('img').attr('src'));
    });
			 	
		  }
		})
	 }

	 

})();